<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreatePictuersTable extends Migration
{
	public function up()
	{
		Schema::create('pictuers', function(Blueprint $table) {
            $table->increments('id');
            $table->integer('user_id')->unsigned();
            $table->integer('view_counts')->unsigned()->default(0);
            $table->integer('up_counts')->unsigned()->default(0);
            $table->string('title')->nullable();
            $table->string('md5')->nullable();
            $table->string('dhash')->nullable();
            $table->string('rgb')->nullable();
            $table->string('domain')->nullable();
            $table->string('path');
            $table->string('filename');
            $table->string('ext');
            $table->integer('width')->unsigned();
            $table->integer('height')->unsigned();
            $table->float('size', 8,  4);
            $table->boolean('hd');
            $table->string('url')->nullable();
            $table->enum('status', ['-1', '0', '1']);
            $table->timestamps();
        });
	}

	public function down()
	{
		Schema::drop('pictuers');
	}
}
